local StoryBehavior = require("gameLogic.story.behavior.StoryBehavior")
local StoryPopupChat = class("StoryPopupChat", StoryBehavior)

function StoryPopupChat:ctor()
    StoryPopupChat.super.ctor(self)
end

function StoryPopupChat:_active()
    if not self._popupChat then
        local params = self:getParams()
        self._popupChat = require("gameLogic.story.storyUI.PopupStoryChat").new()
        self._popupChat:setCallback(handler(self, self._closeChat))
        self._popupChat:updateUI(params.storyId)
    end
end

function StoryPopupChat:_closeChat()
    self:setDone(true)
end

return StoryPopupChat
